package com.suredy.app.porject.export.model;

/**
 * 工程施工管理台帐
 * 
 * @author VIVID.G
 * @since 2016-3-10
 * @version v0.1
 */
public class ContractManageCountModel {

	/* 项目编码 */
	private String no;

	/* 合同名称 */
	private String name;

	/* 合同工期 */
	private String htGq;

	/* 实际工期 */
	private String sjGq;

	/* 建设单位 */
	private String companyA;

	/* 进度情况 */
	private String process;

	/* 合同金额 */
	private Double price;

	/* 结算价金额 */
	private Double jsPrice;

	/* 结算价开票情况 */
	private String jsFapiao;

	/* 结算状态 */
	private String jsStatus;

	/* 任务书任务金额 */
	private Double taskPrice;

	/* 任务书结算金额 */
	private Double taskJsPrice;

	/* 任务书报帐情况 */
	private String taskCompletedStatus;

	/* 分包合同金额 */
	private Double subPrice;

	/* 分包结算金额 */
	private Double subJsPrice;

	/* 分包挂帐情况 */
	private String subCompletedStatus;

	/* 材料费合同金额 */
	private Double materialPrice;

	/* 材料费结算金额 */
	private Double materialJsPrice;

	/* 材料费挂帐情况 */
	private String materialCompletedStatus;

	/* 其它费用 */
	private Double otherPrice;

	/* 竣工资料移交情况 */
	private String jgFiles;

	/* 结算资料移交情况 */
	private String jsFiles;

	/* 项目负责人 */
	private String header;

	/* 实施单位 */
	private String companyB;

	/* 备注 */
	private String remark;

	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getHtGq() {
		return htGq;
	}

	public void setHtGq(String htGq) {
		this.htGq = htGq;
	}

	public String getSjGq() {
		return sjGq;
	}

	public void setSjGq(String sjGq) {
		this.sjGq = sjGq;
	}

	public String getCompanyA() {
		return companyA;
	}

	public void setCompanyA(String companyA) {
		this.companyA = companyA;
	}

	public String getProcess() {
		return process;
	}

	public void setProcess(String process) {
		this.process = process;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Double getJsPrice() {
		return jsPrice;
	}

	public void setJsPrice(Double jsPrice) {
		this.jsPrice = jsPrice;
	}

	public String getJsFapiao() {
		return jsFapiao;
	}

	public void setJsFapiao(String jsFapiao) {
		this.jsFapiao = jsFapiao;
	}

	public String getJsStatus() {
		return jsStatus;
	}

	public void setJsStatus(String jsStatus) {
		this.jsStatus = jsStatus;
	}

	public Double getTaskPrice() {
		return taskPrice;
	}

	public void setTaskPrice(Double taskPrice) {
		this.taskPrice = taskPrice;
	}

	public Double getTaskJsPrice() {
		return taskJsPrice;
	}

	public void setTaskJsPrice(Double taskJsPrice) {
		this.taskJsPrice = taskJsPrice;
	}

	public String getTaskCompletedStatus() {
		return taskCompletedStatus;
	}

	public void setTaskCompletedStatus(String taskCompletedStatus) {
		this.taskCompletedStatus = taskCompletedStatus;
	}

	public Double getSubPrice() {
		return subPrice;
	}

	public void setSubPrice(Double subPrice) {
		this.subPrice = subPrice;
	}

	public Double getSubJsPrice() {
		return subJsPrice;
	}

	public void setSubJsPrice(Double subJsPrice) {
		this.subJsPrice = subJsPrice;
	}

	public String getSubCompletedStatus() {
		return subCompletedStatus;
	}

	public void setSubCompletedStatus(String subCompletedStatus) {
		this.subCompletedStatus = subCompletedStatus;
	}

	public Double getMaterialPrice() {
		return materialPrice;
	}

	public void setMaterialPrice(Double materialPrice) {
		this.materialPrice = materialPrice;
	}

	public Double getMaterialJsPrice() {
		return materialJsPrice;
	}

	public void setMaterialJsPrice(Double materialJsPrice) {
		this.materialJsPrice = materialJsPrice;
	}

	public String getMaterialCompletedStatus() {
		return materialCompletedStatus;
	}

	public void setMaterialCompletedStatus(String materialCompletedStatus) {
		this.materialCompletedStatus = materialCompletedStatus;
	}

	public Double getOtherPrice() {
		return otherPrice;
	}

	public void setOtherPrice(Double otherPrice) {
		this.otherPrice = otherPrice;
	}

	public String getJgFiles() {
		return jgFiles;
	}

	public void setJgFiles(String jgFiles) {
		this.jgFiles = jgFiles;
	}

	public String getJsFiles() {
		return jsFiles;
	}

	public void setJsFiles(String jsFiles) {
		this.jsFiles = jsFiles;
	}

	public String getHeader() {
		return header;
	}

	public void setHeader(String header) {
		this.header = header;
	}

	public String getCompanyB() {
		return companyB;
	}

	public void setCompanyB(String companyB) {
		this.companyB = companyB;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	/**
	 * 毛利
	 * 
	 * @return
	 */
	public double getLr() {
		Double p = this.getJsPrice();

		if (p == null)
			p = this.getPrice();

		if (p == null)
			p = 0d;

		double task = this.getTaskPrice() == null ? 0d : this.getTaskPrice();
		double sub = this.getSubPrice() == null ? 0d : this.getSubPrice();
		double material = this.getMaterialPrice() == null ? 0d : this.getMaterialPrice();
		double other = this.getOtherPrice() == null ? 0d : this.getOtherPrice();

		return p - task - sub - material - other;
	}

	/**
	 * 毛利率
	 * 
	 * @return
	 */
	public double getLrRatio() {

		Double p = this.getJsPrice();

		if (p == null)
			p = this.getPrice();

		if (p == null || p == 0d)
			p = 1d;

		return this.getLr() / p;
	}

}
